package com.wf.feign;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by wufei on 2017/8/8.
 */
@RestController
public class MovieContraller {
    @Autowired
    private UserFeignClient userFeignClient;

    @GetMapping("user/{id}")
    public User findByIdFeign(@PathVariable Long id) {
        User user = this.userFeignClient.findByid(id);
        return user;
    }
}
